import 'package:aichat_flutter_wallet/module_common/widgets/image/public_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class TokenImage extends StatelessWidget {
  double bigSize;
  double smallSize;
  String bigLogo;
  String smallLogo;
  TokenImage({
    super.key,
    this.bigSize = 40,
    this.smallSize = 18,
    this.bigLogo = '',
    this.smallLogo = '',
  });

  @override
  Widget build(BuildContext context) {
    return Stack(
      children: [
        Container(
          width: (bigSize + 6).w,
          height: bigSize.w,
          padding: EdgeInsets.only(right: 6.w),
          decoration: BoxDecoration(
              borderRadius: BorderRadius.all(Radius.circular(20.w))),
          child: PublicImage(
            image: bigLogo,
            fit: BoxFit.fitHeight,
          ),
        ),
        Positioned(
          right: 0,
          bottom: 0,
          child: Container(
            width: smallSize,
            height: smallSize,
            decoration: BoxDecoration(
              border: Border.all(
                color: Colors.white,
                width: 2.0.w,
              ),
              borderRadius: BorderRadius.circular(25),
            ),
            child: PublicImage(
              image: smallLogo,
              fit: BoxFit.fitHeight,
            ),
          ),
        ),
      ],
    );
  }
}
